package LianXi02;

import java.util.Scanner;

public class LianXi02 {
    public static void main(String[] args) {
        //统计5个班各5名同学Java课程的成绩，如何计算5个班各自的总成绩
        int[][] arrInt = new int[5][5];
        Scanner scanner = new Scanner(System.in);
        for (int j = 0; j <5; j++) {
            int nums = 0;
            System.out.println("请输入第"+(j+1)+"个班的成绩");
            for (int i = 0; i < 5; i++) {
                System.out.println("请输入第"+(i+1)+"名学生输入Java成绩：");
                arrInt[j][i] = scanner.nextInt();
                nums = nums +arrInt[j][i];
            }
            System.out.println("第"+(j+1)+"班的总成绩为"+nums);
        }
    }
}
